design/copying a bunch of records
| От | M Spreij |
|---|---|
| Тема | design/copying a bunch of records |
| Дата | |
| Msg-id | a05210602bb445b2d47d5@[192.168.1.12] обсуждение |
| Ответы |
Re: design/copying a bunch of records
|
| Список | pgsql-novice |
Hi all,
I hope to be able to answer more questions than I need to ask later
on, but for now.. :-}
I'm trying to make a system where the admin will create a set of
categories and products, sort order and all, where multiple users
will be able to make custom sets with the same records, with optional
translations, different prices, different product- and category
sortorder. If the admin removes a product, the users won't be able
to use that anymore either (inner join, or a loop-delete from user
sets), but they can add their own products as well. If the admin
adds a record, it would be copied to all user sets as well. This
probably screams "duplicate data" but nearly all records will need
translations or price changes, and custom sorting, so I couldn't
figure any other good way.
So I figured the best way was to copy the records from the
admin-set to user-sets (but suggestions for other ways are very
welcome!), and was wondering if there is a 'good' way to copy about
50 records to different tables every time you add a user account -
the only way I can think of is write some loops in PHP. Better ways?
TIA!
Regards,
Martin
--
<mailto:mac.com@nemo>
<http://www.mechintosh.com/>
В списке pgsql-novice по дате отправления: